---
title: 'Llama Stack'
description: 'Llama Stack is a framework from Meta AI for building Agentic applications.'
---

import CodeTooltip from '/snippets/add-code-tooltip.mdx'
import EnvTooltip from '/snippets/add-env-tooltip.mdx'

AgentOps integrates with Llama Stack via its python [client](https://github.com/meta-llama/llama-stack-client-python) to provide observability into applications that leverage it.

Llama Stack has comprehensive [documentation](https://llama-stack.readthedocs.io/) available as well as a great [quickstart](https://llama-stack.readthedocs.io/en/latest/getting_started/index.html) guide. You can use this guide to setup the Llama Stack server and client or alternatively use our Docker [compose](https://github.com/AgentOps-AI/agentops/blob/main/examples/llama_stack_client_examples/docker-compose.yml) file.

<iframe
  width="560"
  height="315"
	src="https://www.youtube.com/embed/OZgTN4SdQ2Y"
  title="YouTube video player"
  frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowfullscreen
></iframe>

## Adding AgentOps to Llama Stack applications

<Steps>
	<Step title="Install the AgentOps SDK">
		<CodeGroup>
			```bash pip 
			pip install agentops
			```
			```bash poetry
			poetry add agentops
			```
		</CodeGroup>
	</Step>
	<Step title="Install the Llama Stack Client">
		<CodeGroup>
			```bash pip
			pip install llama-stack-client
			```
			```bash poetry
			poetry add llama-stack-client
			```
		</CodeGroup>
	</Step>
	<Step title="Add 3 lines of code">
		<CodeTooltip/>
		<span className="api-key-container">
			<CodeGroup>
				```python python
				import agentops
				agentops.init(<INSERT YOUR API KEY HERE>)
				```
			</CodeGroup>
		</span>
		<EnvTooltip />
    <span className="api-key-container">
      <CodeGroup>
        ```python .env
        AGENTOPS_API_KEY=<YOUR API KEY>
        ```
      </CodeGroup>
      Read more about environment variables in [Advanced Configuration](/v1/usage/advanced-configuration)
    </span>
	</Step>
	<Step title="Run your 🦙🥞 application">
		Execute your program and visit [app.agentops.ai/drilldown](https://app.agentops.ai/drilldown) to observe your waterfall! 🕵️
		<Tip>
			After your run, AgentOps prints a clickable url to console linking directly to your session in the Dashboard
		</Tip> 
	</Step>
</Steps>

## Examples

An example notebook is available [here](https://github.com/AgentOps-AI/agentops/blob/main/examples/llama_stack_client_examples/notebook.ipynb) to showcase how to use the Llama Stack client with AgentOps.

<script type="module" src="/scripts/github_stars.js"></script>
<script type="module" src="/scripts/link_to_api_button.js"></script>
<script type="module" src="/scripts/scroll-img-fadein-animation.js"></script>
<script type="module" src="/scripts/button_heartbeat_animation.js"></script>
<script type="css" src="/styles/styles.css"></script>
<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
